<?php
class Mwc_SystemPoint_ViplistController extends Mage_Adminhtml_Controller_Action{
    public function indexAction(){
        $this->loadLayout()
            ->_addContent($this->getLayout()->createBlock('systempoint/viplist_list'))
            ->renderLayout();
    }

    public function deleteAction(){
        $viplistId = $this->getRequest()->getParam('id', false);

        try {
            Mage::getModel('systempoint/viplist')->setId($viplistId)->delete();
            Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('systempoint')->__('Vip email successfully deleted'));
            $this->getResponse()->setRedirect($this->getUrl('*/*/'));

            return;
        }
        catch (Exception $e){
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
        }

        $this->_redirectReferer();
    }
}